package huoye.shops.huoye.operation.fragment;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.codeideology.android.lang.entity.Paging;
import com.codeideology.android.widget.recycler.RecyclerViewAdapter;

import huoye.shops.base.BaseActivity;
import huoye.shops.base.PullToRefreshFragment;
import huoye.shops.huoye.operation.adapter.ManageEventAdapter;
import huoye.shops.huoye.operation.model.ManageEventData;
import huoye.shops.huoye.operation.view.IManageEventRefreshView;


/**
 * 2018 - 08 - 12 .
 */
public class VipPowerFragment extends PullToRefreshFragment<ManageEventData> implements IManageEventRefreshView {

    public static final int TYPE_POWER_BLACK_CARD = 1; //黑卡权限
    public static final int TYPE_POWER_ALLIANCE  = 2; //联盟权限


    private int mType;

    @Override
    public RecyclerViewAdapter createAdapter() {

        Bundle bundle = getArguments();
        mType = bundle.getInt(BaseActivity.EXTRAS_KEY_DATA);

        ManageEventAdapter adapter = new ManageEventAdapter(getActivity());

        return adapter;
    }

    @Override
    protected void onShowFragment() {
        super.onShowFragment();
        query();
    }

    @Override
    protected void initView(View view, @Nullable Bundle bundle) {
        super.initView(view, bundle);

    }


    @Override
    public void query(Paging paging) {
        super.query(paging);

    }


    public static VipPowerFragment getInstan(int type) {
        VipPowerFragment fragment = new VipPowerFragment();
        Bundle bundle = new Bundle();
        bundle.putInt(BaseActivity.EXTRAS_KEY_DATA, type);
        fragment.setArguments(bundle);
        return fragment;
    }



    @Override
    public void onItemClick(ManageEventData manageEventData, int i, View view) {

    }
}
